# app/common/response.py

def api_response(code=200, data=None, message=""):
    response = {
        "code": code,
        "data": data if data is not None else {},
        "msg": message
    }
    return response, code
